<template>
  <div id="Container">
    <div id="Content-Top">
      <span id="P-Style">安检模板</span>
    </div>
    <div id="Content-Left">
      <item-view  v-ref:itemview @select-changed="selected"></item-view>
    </div>
    <div id="Content-right">
      <info-view v-ref:infoview :item-id="item.id" @select-changed="selectInfo"></info-view>
    </div>
    <div id="Content-base">
      <save-item :row="item" @commit="$refs.itemview.refresh()"></save-item>
    </div>
    <div id="Content-lower">
      <save-info :item-id="item.id" :row="selectedInfo" @commit="$refs.infoview.refresh()"></save-info>
    </div>
  </div>
</template>

<script>
  export default {
    title: 'ceshi',
    data () {
      return {
        test: 'test',
        // 当前选中项
        item: {},
        selectedInfo: {}
      }
    },
    methods: {
      search () {
        this.$resetpost('rs/path/selectmodel').then((res) => {
          console.log('res', res)
        })
      },
      selected(val){
        this.item = val.val
      },
      selectInfo(val) {
        this.selectedInfo = val.val
      },
    }
  }
</script>

<style scoped>
  #Container{
    width:1000px;
    margin: auto;/*设置整个容器在浏览器中水平居中*/
    //border: 1px solid #000;
  }
  #Content-Top{
    height:50px;
    width:1000px;
    padding-top: 5px;
    background-color: #4C637B;
    //border: 1px solid #000;
  }
  #Content-Left{
    height:530px;
    width:400px;
    margin-left:20px;
    margin-right:20px;
    float:left;/*设置浮动，实现多列效果，div+Css布局中很重要的*/
    //border: 1px solid #000;
  }

  #Content-right{
     height:530px;
     width:500px;
     margin-left:20px;
     margin-right:20px;
     float:left;/*设置浮动，实现多列效果，div+Css布局中很重要的*/
     //border: 1px solid #000;
   }

  #Content-base{
     height:50px;
     width:400px;
     margin-left:20px;
     margin-right:20px;
     float:left;/*设置浮动，实现多列效果，div+Css布局中很重要的*/
     //border: 1px solid #000;
  }

  #Content-lower{
    height:50px;
    width:500px;
    margin-left:20px;
    margin-right:20px;
    float:left;/*设置浮动，实现多列效果，div+Css布局中很重要的*/
    //border: 1px solid #000;
  }

  #P-Style{
    font-family:"宋体";
    font-weight: bolder;
    font-size:28px;
    color: #FFFFFF;
    margin-left: 40px;
  }
</style>
